package com.common.transformer;

import com.applicationLayer.formbean.CommentForm;
import com.common.entity.Comment;

public class CommentTransformer {

	
	/*******************************
	 * Transformer
	 *******************************/
	public static Comment CommentForm_TO_Comment(CommentForm coForm){
		Comment co=new Comment();
		co.setTitle(coForm.getTitle());
		co.setComment_id(coForm.getId_comment());
		co.setReceiver_covoit(coForm.getReceiver_covoit());
		co.setSender_covoit(coForm.getSender_covoit());
		co.setSatisfaction(coForm.getSatisfaction());
		co.setDate_comment(coForm.getDate_comment());
		co.setComment(coForm.getComment());
		co.setPath_id(coForm.getPath_id());
		return co;
	}

	public static CommentForm Comment_TO_CommentForm(Comment co,String covoitName) {
		CommentForm commentForm = new CommentForm();
		commentForm.setTitle(co.getTitle());
		commentForm.setId_comment(co.getComment_id());
		commentForm.setReceiver_covoit(co.getReceiver_covoit());
		commentForm.setSender_covoit(co.getSender_covoit());
		commentForm.setSatisfaction(co.getSatisfaction());
		commentForm.setDate_comment(co.getDate_comment());
		commentForm.setComment(co.getComment());
		commentForm.setSender_name(covoitName);
		return commentForm;
	}
}
